package com.yanqu.road.entity.activity.dafuweng.cross;

import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.activity.dafuweng.DFWUnionData;
import com.yanqu.road.entity.activity.dafuweng.DFWUnionRecord;
import com.yanqu.road.entity.activity.dafuweng.DFWUserCollectData;
import com.yanqu.road.entity.activity.dafuweng.DFWUserData;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 大富翁数据
 */
public class CrossDfwUnionData {

    private int groupId;

    /**
     * 活动ID
     */
    private int activityId;

    /**
     * 活动信息
     */
    private ActivityInfo activityInfo;

    /**
     * 商会数据
     */
    private Map<String, DFWUnionData> unionDataMap = new ConcurrentHashMap<>();

    /**
     * 商会造谣记录（被造谣商会UID，记录）
     */
    private Map<String, List<DFWUnionRecord>> zaoYaoMap = new ConcurrentHashMap<>();

    /**
     * 商会祝福记录（被祝福商会UID，记录）
     */
    private Map<String, List<DFWUnionRecord>> zhuFuMap = new ConcurrentHashMap<>();

    /**
     * 冗余商会记录下个ID
     */
    private AtomicInteger nextRecordId = new AtomicInteger(1);

    /**
     * 玩家收集数据
     * activityId - unionUid - itemId - timeMark - userId
     */
    private Map<Integer, Map<String, Map<Integer, Map<Integer, Map<Long, DFWUserCollectData>>>>> userCollectDataMap = new ConcurrentHashMap<>();


    public CrossDfwUnionData(int activityId, int groupId) {
        this.activityId = activityId;
        this.groupId = groupId;
    }


    public int getNextRecordId() {
        return nextRecordId.getAndIncrement();
    }

    public void setNextRecordId(AtomicInteger nextRecordId) {
        this.nextRecordId = nextRecordId;
    }

    public Map<String, List<DFWUnionRecord>> getZaoYaoMap() {
        return zaoYaoMap;
    }

    public void setZaoYaoMap(Map<String, List<DFWUnionRecord>> zaoYaoMap) {
        this.zaoYaoMap = zaoYaoMap;
    }

    public Map<String, List<DFWUnionRecord>> getZhuFuMap() {
        return zhuFuMap;
    }

    public void setZhuFuMap(Map<String, List<DFWUnionRecord>> zhuFuMap) {
        this.zhuFuMap = zhuFuMap;
    }

    public Map<String, DFWUnionData> getUnionDataMap() {
        return unionDataMap;
    }

    public void setUnionDataMap(Map<String, DFWUnionData> unionDataMap) {
        this.unionDataMap = unionDataMap;
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public Map<Integer, Map<String, Map<Integer, Map<Integer, Map<Long, DFWUserCollectData>>>>> getUserCollectDataMap() {
        return userCollectDataMap;
    }

    public void setUserCollectDataMap(Map<Integer, Map<String, Map<Integer, Map<Integer, Map<Long, DFWUserCollectData>>>>> userCollectDataMap) {
        this.userCollectDataMap = userCollectDataMap;
    }

    public ActivityInfo getActivityInfo() {
        return activityInfo;
    }

    public void setActivityInfo(ActivityInfo activityInfo) {
        this.activityInfo = activityInfo;
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }
}
